#include "app.h"
#include "user_cfg.h"
#include "beep.h"
#include "uart_process.h"
#include "uart_decode.h"
#include "key_process.h"
#include "timeout.h"
#include "rgb.h"
#include "pushrod_bsp.h"

app_para_t app_para;

void App_Init(void)
{
	SetSysClockToHSI();
	TIM6_Config_Irq();
	TimeOut_Det_Init();
	Uart_Decode_Init();
	Rgb_Port_Init();
	Pushrod_Init();
	Beep_Init();
	Send_Init();
}


void App_Process(void)
{
	Beep_Handle();
	Key_Handle(app_para.uart1_rev_cmd);
	Pushrod_Process();
	Rgb_Process();

	// if (TimeOut_Det_Check(&key_para.timeout_send)) {
	// 	Uart_Data_Pack(0);
	// 	TimeOut_Record(&key_para.timeout_send, 50);
	// }
}

